<?php
/**
 * 店铺管理模块
 * 
 * @author river_he@eueang.com
 */
abstract class Kit_Model_Abstract {
	/**
	 * dao数组
	 * 
	 * @var Kit_Dao_Abstract[]
	 */
	protected $daos = array();
	
	/**
	 * 获取店铺dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopDao(){
		if(!isset($this->daos['shop'])){
			$this->daos['shop'] = new Kit_Dao_Shop();
		}
		return $this->daos['shop'];
	}
	
	/**
	 * 获取店铺统计dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopStatDao(){
		if(!isset($this->daos['shopstat'])){
			$this->daos['shopstat'] = new Kit_Dao_Shop_Stat();
		}
		return $this->daos['shopstat'];
	}
	
	/**
	 * 获取店铺任务dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopTaskDao(){
		if(!isset($this->daos['shoptask'])){
			$this->daos['shoptask'] = new Kit_Dao_Shop_Task();
		}
		return $this->daos['shoptask'];
	}
	
	/**
	 * 获取店铺食材dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopMaterialDao(){
		if(!isset($this->daos['shopmater'])){
			$this->daos['shopmater'] = new Kit_Dao_Shop_Material();
		}
		return $this->daos['shopmater'];
	}
	
	/**
	 * 获取店铺搭配dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopMatchDao(){
		if(!isset($this->daos['shopmatch'])){
			$this->daos['shopmatch'] = new Kit_Dao_Shop_Match();
		}
		return $this->daos['shopmatch'];
	}
	
	/**
	 * 获取店铺使用道具dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopPropDao(){
		if(!isset($this->daos['shopprop'])){
			$this->daos['shopprop'] = new Kit_Dao_Shop_Prop();
		}
		return $this->daos['shopprop'];
	}
	
	/**
	 * 获取店铺使用装修材料dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShopDecoDao(){
		if(!isset($this->daos['shopmater'])){
			$this->daos['shopmater'] = new Kit_Dao_Shop_Decorate();
		}
		return $this->daos['shopmater'];
	}
	
	/**
	 * 获取装修家具dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getDecorateDao(){
		if(!isset($this->daos['deco'])){
			$this->daos['deco'] = new Kit_Dao_Decorate();
		}
		return $this->daos['deco'];
	}
	
	/**
	 * 系统道具dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getPropertyDao(){
		if(!isset($this->daos['prop'])){
			$this->daos['prop'] = new Kit_Dao_Prop();
		}
		return $this->daos['prop'];
	}
	
	/**
	 * 获取店主dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShoperDao(){
		if(!isset($this->daos['shoper'])){
			$this->daos['shoper'] = new Kit_Dao_Shoper();
		}
		return $this->daos['shoper'];
	}
	
	/**
	 * 获取店主道具dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShoperPropDao(){
		if(!isset($this->daos['shoperprop'])){
			$this->daos['shoperprop'] = new Kit_Dao_Shoper_Prop();
		}
		return $this->daos['shoperprop'];
	}
	
	/**
	 * 获取店主装修dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShoperDecoDao(){
		if(!isset($this->daos['shoperdeco'])){
			$this->daos['shoperdeco'] = new Kit_Dao_Shoper_Decorate();
		}
		return $this->daos['shoperdeco'];
	}
	
	/**
	 * 获取店主好友dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShoperFriendDao(){
		if(!isset($this->daos['shoperfriend'])){
			$this->daos['shoperfriend'] = new Kit_Dao_Shoper_Friend();
		}
		return $this->daos['shoperfriend'];
	}
	
	/**
	 * 获取店主食材dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getShoperMaterialDao(){
		if(!isset($this->daos['shopermater'])){
			$this->daos['shopermater'] = new Kit_Dao_Shoper_Material();
		}
		return $this->daos['shopermater'];
	}
	
	/**
	 * 获取食材dao
	 * 
	 * @return Kit_Dao_Abstract
	 */
	protected function getMaterialDao(){
		if(!isset($this->daos['mater'])){
			$this->daos['mater'] = new Kit_Dao_Material();
		}
		return $this->daos['mater'];
	}
	
	/**
	 * 获取npcdao
	 * 
	 * @return Kit_Dao_Npc
	 */
	protected function getNpcDao(){
		if(!isset($this->daos['npc'])){
			$this->daos['npc'] = new Kit_Dao_Npc();
		}
		return $this->daos['npc'];
	}
}
//end